package com.aop;

import com.aop.concert.Enhancer;
import com.aop.concert.MusicPerformance;
import com.aop.concert.Performance;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:com/resource/spring-config.xml"})
public class AspectTest {

    @Autowired
    private Performance performance;

    @Test
    public void test(){
//        ((Enhancer)performance).extend();
        performance.perform();
    }
}
